﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Qy.Scenario;

[SugarTable(DbTableName.OasDocPost)]

public class DocPost
{
    [SugarColumn(IsPrimaryKey = true)]
    /// <summary>
    /// ID
    /// </summary>
    public int Id { get; set; }
    /// <summary>
    /// 类别
    /// </summary>
    public int Cid { get; set; }
    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; }
    /// <summary>
    /// 附件
    /// </summary>
    public string Attments { get; set; }
    /// <summary>
    /// 用户ID
    /// </summary>
    public int Uid { get; set; }
    /// <summary>
    /// 状态标识
    /// </summary>
    public int SecretLevel { get; set; }
    /// <summary>
    /// 系统写入时间
    /// </summary>
    public DateTime Time { get; set; } = DateTime.Now;
    /// <summary>
    /// 文号
    /// </summary>
    public int DocNumber { get; set; }

    /// <summary>
    /// 报送部门
    /// </summary>
    public string Department { get; set; }
    /// <summary>
    /// 报送领导
    /// </summary>
    public string Leader { get; set; }
    /// <summary>
    /// 审签
    /// </summary>
    public string Examine { get; set; }
    /// <summary>
    /// 拟稿
    /// </summary>
    public string Auther { get; set; }
    /// <summary>
    /// 校对
    /// </summary>
    public string Proofread { get; set; }
    /// <summary>
    /// 初审
    /// </summary>
    public string EarlierExa { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remarks { get; set; }
}


public class EditDocPostAndContent
{
    public int Id { get; set; }
    [Display(Name = "类别")]
    [Required(ErrorMessage = "请选择类别")]
    public int Cid { get; set; }
    [Display(Name = "拟文标题")]
    [Required(ErrorMessage = "拟文标题未填写")]
    public string Title { get; set; }
    public string Attments { get; set; }
    [Display(Name = "报送时间")]
    [Required(ErrorMessage = "时间未填写")]
    public DateTime Time { get; set; } = DateTime.Now;
    [Display(Name = "密级")]
    public int SecretLevel { get; set; }
    [Display(Name = "内容")]
    public string Content { get; set; }
    [Display(Name = "文号")]
    public int DocNumber { get; set; }
    [Display(Name = "报送部门")]
    public string Department { get; set; }
    [Display(Name = "报送领导")]
    public string Leader { get; set; }
    [Display(Name = "拟稿")]
    public string Auther { get; set; }
    [Display(Name = "校对")]
    public string Proofread { get; set; }
    [Display(Name = "初审")]
    public string EarlierExa { get; set; }
    [Display(Name = "审签")]
    public string Examine { get; set; }
    [Display(Name = "备注")]
    public string Remarks { get; set; }
    public string CateName { get; set; }
    public string DeptName { get; set; }
    public int Uid { get; set; }
}

public class ViewDocPostAndCate
{
    public int Id { get; set; }
    public int Cid { get; set; }
    public int Uid { get; set; }
    public string Title { get; set; }
    public string CateName { get; set; }
    public string DeptName { get; set; }
    public string NickName { get; set; }
    public int SecretLevel { get; set; }
    public DateTime Time { get; set; }
    public int DocNumber { get; set; }
    public string Department { get; set; }
    public string Leader { get; set; }
    public string Examine { get; set; }
    public string Auther { get; set; }
    public string Proofread { get; set; }
    public string EarlierExa { get; set; }
    public string Remarks { get; set; }
    public int Mark { get; set; }
}

/// <summary>
/// 查询模型
/// </summary>
public class QueryDocPost : PagerInfo
{
    public int[] Cids { get; set; } = null;
    public string Orderby { get; set; }
    public int Uid { get; set; }
    public List<int> Uids { get; set; }
    public string Title { get; set; }
    public string NickName { get; set; }
    public DateTime? StartDate { get; set; }
    public DateTime? EndDate { get; set; }
    public int FullTextSwitch { get; set; }
    public bool MarkStatus { get; set; }
}

public class CountDocPost
{
    public int Uids { get; set; }
    public int Cids { get; set; }
    public string Name { get; set; }
    public int Value { get; set; }
    public int MarkNum { get; set; }
}



